

#include "arm_2d_helper.h"

#if defined(__clang__)
#   pragma clang diagnostic push
#   pragma clang diagnostic ignored "-Wunknown-warning-option"
#   pragma clang diagnostic ignored "-Wreserved-identifier"
#   pragma clang diagnostic ignored "-Wmissing-variable-declarations"
#   pragma clang diagnostic ignored "-Wcast-qual"
#   pragma clang diagnostic ignored "-Wmissing-declarations"
#   pragma clang diagnostic ignored "-Wgnu-variable-sized-type-not-at-end"
#   pragma clang diagnostic ignored "-Wimplicit-int-conversion"
#   pragma clang diagnostic ignored "-Wdeclaration-after-statement"
#   pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#   pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
#   pragma clang diagnostic ignored "-Wpadded"
#   pragma clang diagnostic ignored "-Wunused-parameter"
#   pragma clang diagnostic ignored "-Wunused-variable"
#   pragma clang diagnostic ignored "-Wsign-conversion"
#elif defined(__IS_COMPILER_GCC__)
#   pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
#   pragma GCC diagnostic ignored "-Wunused-variable"
#elif defined(__IS_COMPILER_ARM_COMPILER_5__)
#   pragma diag_suppress=1296,1,64
#endif

typedef struct {
    uint16_t      hwIndex;
    arm_2d_size_t tCharSize;
    int16_t       iAdvance;
    int16_t       iBearingX;
    int16_t       iBearingY;
    uint8_t       chCodeLength;
    uint8_t       chUTF8[4];
} const __ttf_char_descriptor_t;

ARM_SECTION("arm2d.asset.FONT")
const uint8_t c_bmpUTF8SQUARE_DIGITS_24A1Font[] = {


    // Glyph for character {0x30}
    0xff, 0x07, 0xff, 0x07, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,
    0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
    0x03, 0x06, 0x03, 0x06, 0xff, 0x07, 0xff, 0x07,

    // Glyph for character {0x31}
    0x1f, 0x00, 0x1f, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18,
    0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00,
    0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00,

    // Glyph for character {0x32}
    0xff, 0x07, 0xff, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00,
    0x06, 0xff, 0x07, 0xff, 0x07, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00,
    0x03, 0x00, 0x03, 0x00, 0xff, 0x07, 0xff, 0x07,

    // Glyph for character {0x33}
    0xff, 0x07, 0xff, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00,
    0x06, 0xff, 0x07, 0xff, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,
    0x00, 0x06, 0x00, 0x06, 0xff, 0x07, 0xff, 0x07,

    // Glyph for character {0x34}
    0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,
    0x06, 0xff, 0x07, 0xff, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,
    0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,

    // Glyph for character {0x35}
    0xff, 0x07, 0xff, 0x07, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03,
    0x00, 0xff, 0x07, 0xff, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,
    0x00, 0x06, 0x00, 0x06, 0xff, 0x07, 0xff, 0x07,

    // Glyph for character {0x36}
    0xff, 0x07, 0xff, 0x07, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03,
    0x00, 0xff, 0x07, 0xff, 0x07, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
    0x03, 0x06, 0x03, 0x06, 0xff, 0x07, 0xff, 0x07,

    // Glyph for character {0x37}
    0xff, 0x07, 0xff, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00,
    0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,
    0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,

    // Glyph for character {0x38}
    0xff, 0x07, 0xff, 0x07, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,
    0x06, 0xff, 0x07, 0xff, 0x07, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06,
    0x03, 0x06, 0x03, 0x06, 0xff, 0x07, 0xff, 0x07,

    // Glyph for character {0x39}
    0xff, 0x07, 0xff, 0x07, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,
    0x06, 0xff, 0x07, 0xff, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06,
    0x00, 0x06, 0x00, 0x06, 0xff, 0x07, 0xff, 0x07,

    // Glyph for character {0x3a}
    0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
    0x03, 0x00,
    // a white space
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
};

ARM_SECTION("arm2d.asset.FONT")
 __ttf_char_descriptor_t c_tUTF8SQUARE_DIGITS_24LookUpTableA1[] = {

    { 0, { 11, 15, }, 14, 0, 15, 1, {0x30} },
    { 15, { 5, 15, }, 8, 0, 15, 1, {0x31} },
    { 30, { 11, 15, }, 14, 0, 15, 1, {0x32} },
    { 45, { 11, 15, }, 14, 0, 15, 1, {0x33} },
    { 60, { 11, 15, }, 14, 0, 15, 1, {0x34} },
    { 75, { 11, 15, }, 14, 0, 15, 1, {0x35} },
    { 90, { 11, 15, }, 14, 0, 15, 1, {0x36} },
    { 105, { 11, 15, }, 14, 0, 15, 1, {0x37} },
    { 120, { 11, 15, }, 14, 0, 15, 1, {0x38} },
    { 135, { 11, 15, }, 14, 0, 15, 1, {0x39} },
    { 150, { 2, 12, }, 5, 0, 12, 1, {0x3a} },
    { 162, { 11, 15, }, 11, 0, 15, 1, {0x20} },
};



ARM_SECTION("arm2d.tile.c_tileUTF8SQUARE_DIGITS_24A1Mask")
static const arm_2d_tile_t c_tileUTF8SQUARE_DIGITS_24A1Mask = {
    .tRegion = {
        .tSize = {
            .iWidth = 11,
            .iHeight = 165,
        },
    },
    .tInfo = {
        .bIsRoot = true,
        .bHasEnforcedColour = true,
        .tColourInfo = {
            .chScheme = ARM_2D_COLOUR_1BIT,
        },
    },
    .pchBuffer = (uint8_t *)c_bmpUTF8SQUARE_DIGITS_24A1Font,
};

#define __UTF8_FONT_SIZE_1__



static
IMPL_FONT_GET_CHAR_DESCRIPTOR(__utf8_a1_font_get_char_descriptor)
{
    assert(NULL != ptFont);
    assert(NULL != ptDescriptor);
    assert(NULL != pchCharCode);

    arm_2d_user_font_t *ptThis = (arm_2d_user_font_t *)ptFont;
    ARM_2D_UNUSED(ptThis);

    memset(ptDescriptor, 0, sizeof(arm_2d_char_descriptor_t));

    ptDescriptor->tileChar.ptParent = (arm_2d_tile_t *)&ptFont->tileFont;
    ptDescriptor->tileChar.tInfo.bDerivedResource = true;

    /* use the white space as the default char */
    __ttf_char_descriptor_t *ptUTF8Char =
        (__ttf_char_descriptor_t *)&c_tUTF8SQUARE_DIGITS_24LookUpTableA1[dimof(c_tUTF8SQUARE_DIGITS_24LookUpTableA1)-1];

    arm_foreach(__ttf_char_descriptor_t, c_tUTF8SQUARE_DIGITS_24LookUpTableA1, ptChar) {
        if (0 == strncmp(   (char *)pchCharCode,
                            (char *)ptChar->chUTF8,
                            ptChar->chCodeLength)) {
            /* found the UTF8 char */
            ptUTF8Char = ptChar;
            break;
        }
    }

    ptDescriptor->chCodeLength = ptUTF8Char->chCodeLength;
    ptDescriptor->tileChar.tRegion.tSize = ptUTF8Char->tCharSize;
    ptDescriptor->tileChar.tRegion.tLocation.iY = (int16_t)ptUTF8Char->hwIndex;

    ptDescriptor->iAdvance = ptUTF8Char->iAdvance;
    ptDescriptor->iBearingX= ptUTF8Char->iBearingX;
    ptDescriptor->iBearingY= ptUTF8Char->iBearingY;

    return ptDescriptor;
}

const
struct {
    implement(arm_2d_user_font_t);
    arm_2d_char_idx_t tUTF8Table;
} ARM_2D_FONT_SQUARE_DIGITS_24_A1 = {

    .use_as__arm_2d_user_font_t = {
        .use_as__arm_2d_font_t = {
            .tileFont = impl_child_tile(
                c_tileUTF8SQUARE_DIGITS_24A1Mask,
                0,          /* x offset */
                0,          /* y offset */
                11,        /* width */
                165         /* height */
            ),
            .tCharSize = {
                .iWidth = 11,
                .iHeight = 15,
            },
            .nCount =  11,                             //!< Character count
            .fnGetCharDescriptor = &__utf8_a1_font_get_char_descriptor,
            .fnDrawChar = &__arm_2d_lcd_text_default_a1_font_draw_char,
        },
        .hwCount = 1,
        .hwDefaultCharIndex = 1, /* tBlank */
    },

    .tUTF8Table = {
        .hwCount = 11,
        .hwOffset = 0,
    },
};

#undef __UTF8_FONT_SIZE_1__

ARM_SECTION("arm2d.asset.FONT")
const uint8_t c_bmpUTF8SQUARE_DIGITS_24A2Font[] = {


    // Glyph for character {0x30}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x0b, 0x00, 0x2c, 0x0b, 0x00,
    0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b,
    0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c,
    0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff, 0xff,
    0x2f,

    // Glyph for character {0x31}
    0xff, 0x02, 0x00, 0xff, 0x02, 0x00, 0xc0, 0x02, 0x00, 0xc0, 0x02,
    0x00, 0xc0, 0x02, 0x00, 0xc0, 0x02, 0x00, 0xc0, 0x02, 0x00, 0xc0,
    0x02, 0x00, 0xc0, 0x02, 0x00, 0xc0, 0x02, 0x00, 0xc0, 0x02, 0x00,
    0xc0, 0x02, 0x00, 0xc0, 0x02, 0x00, 0xc0, 0x02, 0x00, 0xc0, 0x02,
    0x00,

    // Glyph for character {0x32}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x00, 0x00, 0x2c, 0x00, 0x00,
    0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff,
    0xff, 0x2f, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00,
    0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xff, 0xff,
    0x2f,

    // Glyph for character {0x33}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x00, 0x00, 0x2c, 0x00, 0x00,
    0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff,
    0xff, 0x2f, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c,
    0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff, 0xff,
    0x2f,

    // Glyph for character {0x34}
    0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00,
    0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff,
    0xff, 0x2f, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c,
    0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00,
    0x2c,

    // Glyph for character {0x35}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x0b, 0x00, 0x00, 0x0b, 0x00,
    0x00, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xff,
    0xff, 0x2f, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c,
    0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff, 0xff,
    0x2f,

    // Glyph for character {0x36}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x0b, 0x00, 0x00, 0x0b, 0x00,
    0x00, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xff,
    0xff, 0x2f, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c,
    0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff, 0xff,
    0x2f,

    // Glyph for character {0x37}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x00, 0x00, 0x2c, 0x00, 0x00,
    0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00,
    0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c,
    0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00,
    0x2c,

    // Glyph for character {0x38}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x0b, 0x00, 0x2c, 0x0b, 0x00,
    0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff,
    0xff, 0x2f, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c,
    0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff, 0xff,
    0x2f,

    // Glyph for character {0x39}
    0xff, 0xff, 0x2f, 0xff, 0xff, 0x2f, 0x0b, 0x00, 0x2c, 0x0b, 0x00,
    0x2c, 0x0b, 0x00, 0x2c, 0x0b, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff,
    0xff, 0x2f, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c,
    0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0xff, 0xff, 0x2f, 0xff, 0xff,
    0x2f,

    // Glyph for character {0x3a}
    0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00,
    0x0b, 0x00, 0x00,
    // a white space
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
};

ARM_SECTION("arm2d.asset.FONT")
 __ttf_char_descriptor_t c_tUTF8SQUARE_DIGITS_24LookUpTableA2[] = {

    { 0, { 11, 15, }, 14, 0, 15, 1, {0x30} },
    { 15, { 5, 15, }, 8, 0, 15, 1, {0x31} },
    { 30, { 11, 15, }, 14, 0, 15, 1, {0x32} },
    { 45, { 11, 15, }, 14, 0, 15, 1, {0x33} },
    { 60, { 11, 15, }, 14, 0, 15, 1, {0x34} },
    { 75, { 11, 15, }, 14, 0, 15, 1, {0x35} },
    { 90, { 11, 15, }, 14, 0, 15, 1, {0x36} },
    { 105, { 11, 15, }, 14, 0, 15, 1, {0x37} },
    { 120, { 11, 15, }, 14, 0, 15, 1, {0x38} },
    { 135, { 11, 15, }, 14, 0, 15, 1, {0x39} },
    { 150, { 2, 12, }, 5, 0, 12, 1, {0x3a} },
    { 162, { 11, 15, }, 11, 0, 15, 1, {0x20} },
};



ARM_SECTION("arm2d.tile.c_tileUTF8SQUARE_DIGITS_24A2Mask")
static const arm_2d_tile_t c_tileUTF8SQUARE_DIGITS_24A2Mask = {
    .tRegion = {
        .tSize = {
            .iWidth = 11,
            .iHeight = 165,
        },
    },
    .tInfo = {
        .bIsRoot = true,
        .bHasEnforcedColour = true,
        .tColourInfo = {
            .chScheme = ARM_2D_COLOUR_2BIT,
        },
    },
    .pchBuffer = (uint8_t *)c_bmpUTF8SQUARE_DIGITS_24A2Font,
};

#define __UTF8_FONT_SIZE_2__



static
IMPL_FONT_GET_CHAR_DESCRIPTOR(__utf8_a2_font_get_char_descriptor)
{
    assert(NULL != ptFont);
    assert(NULL != ptDescriptor);
    assert(NULL != pchCharCode);

    arm_2d_user_font_t *ptThis = (arm_2d_user_font_t *)ptFont;
    ARM_2D_UNUSED(ptThis);

    memset(ptDescriptor, 0, sizeof(arm_2d_char_descriptor_t));

    ptDescriptor->tileChar.ptParent = (arm_2d_tile_t *)&ptFont->tileFont;
    ptDescriptor->tileChar.tInfo.bDerivedResource = true;

    /* use the white space as the default char */
    __ttf_char_descriptor_t *ptUTF8Char =
        (__ttf_char_descriptor_t *)&c_tUTF8SQUARE_DIGITS_24LookUpTableA2[dimof(c_tUTF8SQUARE_DIGITS_24LookUpTableA2)-1];

    arm_foreach(__ttf_char_descriptor_t, c_tUTF8SQUARE_DIGITS_24LookUpTableA2, ptChar) {
        if (0 == strncmp(   (char *)pchCharCode,
                            (char *)ptChar->chUTF8,
                            ptChar->chCodeLength)) {
            /* found the UTF8 char */
            ptUTF8Char = ptChar;
            break;
        }
    }

    ptDescriptor->chCodeLength = ptUTF8Char->chCodeLength;
    ptDescriptor->tileChar.tRegion.tSize = ptUTF8Char->tCharSize;
    ptDescriptor->tileChar.tRegion.tLocation.iY = (int16_t)ptUTF8Char->hwIndex;

    ptDescriptor->iAdvance = ptUTF8Char->iAdvance;
    ptDescriptor->iBearingX= ptUTF8Char->iBearingX;
    ptDescriptor->iBearingY= ptUTF8Char->iBearingY;

    return ptDescriptor;
}

const
struct {
    implement(arm_2d_user_font_t);
    arm_2d_char_idx_t tUTF8Table;
} ARM_2D_FONT_SQUARE_DIGITS_24_A2 = {

    .use_as__arm_2d_user_font_t = {
        .use_as__arm_2d_font_t = {
            .tileFont = impl_child_tile(
                c_tileUTF8SQUARE_DIGITS_24A2Mask,
                0,          /* x offset */
                0,          /* y offset */
                11,        /* width */
                165         /* height */
            ),
            .tCharSize = {
                .iWidth = 11,
                .iHeight = 15,
            },
            .nCount =  11,                             //!< Character count
            .fnGetCharDescriptor = &__utf8_a2_font_get_char_descriptor,
            .fnDrawChar = &__arm_2d_lcd_text_default_a2_font_draw_char,
        },
        .hwCount = 1,
        .hwDefaultCharIndex = 1, /* tBlank */
    },

    .tUTF8Table = {
        .hwCount = 11,
        .hwOffset = 0,
    },
};

#undef __UTF8_FONT_SIZE_2__

ARM_SECTION("arm2d.asset.FONT")
const uint8_t c_bmpUTF8SQUARE_DIGITS_24A4Font[] = {


    // Glyph for character {0x30}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00,
    0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff,
    0xff, 0x08,

    // Glyph for character {0x31}
    0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0xff, 0x08, 0x00, 0x00,
    0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00,
    0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00,
    0x00, 0x00,

    // Glyph for character {0x32}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff,
    0xff, 0xff, 0xff, 0x08, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00,
    0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff,
    0xff, 0x08,

    // Glyph for character {0x33}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff,
    0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff,
    0xff, 0x08,

    // Glyph for character {0x34}
    0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff,
    0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00,
    0xf0, 0x08,

    // Glyph for character {0x35}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff,
    0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff,
    0xff, 0x08,

    // Glyph for character {0x36}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff,
    0xff, 0xff, 0xff, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff,
    0xff, 0x08,

    // Glyph for character {0x37}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00,
    0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00,
    0xf0, 0x08,

    // Glyph for character {0x38}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff,
    0xff, 0xff, 0xff, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff,
    0xff, 0x08,

    // Glyph for character {0x39}
    0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00,
    0xf0, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x8f, 0x00, 0x00,
    0x00, 0xf0, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff,
    0xff, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00,
    0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08,
    0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0,
    0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff,
    0xff, 0x08,

    // Glyph for character {0x3a}
    0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x8f, 0x00, 0x00, 0x00, 0x00, 0x00,
    // a white space
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
};

ARM_SECTION("arm2d.asset.FONT")
 __ttf_char_descriptor_t c_tUTF8SQUARE_DIGITS_24LookUpTableA4[] = {

    { 0, { 11, 15, }, 14, 0, 15, 1, {0x30} },
    { 15, { 5, 15, }, 8, 0, 15, 1, {0x31} },
    { 30, { 11, 15, }, 14, 0, 15, 1, {0x32} },
    { 45, { 11, 15, }, 14, 0, 15, 1, {0x33} },
    { 60, { 11, 15, }, 14, 0, 15, 1, {0x34} },
    { 75, { 11, 15, }, 14, 0, 15, 1, {0x35} },
    { 90, { 11, 15, }, 14, 0, 15, 1, {0x36} },
    { 105, { 11, 15, }, 14, 0, 15, 1, {0x37} },
    { 120, { 11, 15, }, 14, 0, 15, 1, {0x38} },
    { 135, { 11, 15, }, 14, 0, 15, 1, {0x39} },
    { 150, { 2, 12, }, 5, 0, 12, 1, {0x3a} },
    { 162, { 11, 15, }, 11, 0, 15, 1, {0x20} },
};



ARM_SECTION("arm2d.tile.c_tileUTF8SQUARE_DIGITS_24A4Mask")
static const arm_2d_tile_t c_tileUTF8SQUARE_DIGITS_24A4Mask = {
    .tRegion = {
        .tSize = {
            .iWidth = 11,
            .iHeight = 165,
        },
    },
    .tInfo = {
        .bIsRoot = true,
        .bHasEnforcedColour = true,
        .tColourInfo = {
            .chScheme = ARM_2D_COLOUR_4BIT,
        },
    },
    .pchBuffer = (uint8_t *)c_bmpUTF8SQUARE_DIGITS_24A4Font,
};

#define __UTF8_FONT_SIZE_4__



static
IMPL_FONT_GET_CHAR_DESCRIPTOR(__utf8_a4_font_get_char_descriptor)
{
    assert(NULL != ptFont);
    assert(NULL != ptDescriptor);
    assert(NULL != pchCharCode);

    arm_2d_user_font_t *ptThis = (arm_2d_user_font_t *)ptFont;
    ARM_2D_UNUSED(ptThis);

    memset(ptDescriptor, 0, sizeof(arm_2d_char_descriptor_t));

    ptDescriptor->tileChar.ptParent = (arm_2d_tile_t *)&ptFont->tileFont;
    ptDescriptor->tileChar.tInfo.bDerivedResource = true;

    /* use the white space as the default char */
    __ttf_char_descriptor_t *ptUTF8Char =
        (__ttf_char_descriptor_t *)&c_tUTF8SQUARE_DIGITS_24LookUpTableA4[dimof(c_tUTF8SQUARE_DIGITS_24LookUpTableA4)-1];

    arm_foreach(__ttf_char_descriptor_t, c_tUTF8SQUARE_DIGITS_24LookUpTableA4, ptChar) {
        if (0 == strncmp(   (char *)pchCharCode,
                            (char *)ptChar->chUTF8,
                            ptChar->chCodeLength)) {
            /* found the UTF8 char */
            ptUTF8Char = ptChar;
            break;
        }
    }

    ptDescriptor->chCodeLength = ptUTF8Char->chCodeLength;
    ptDescriptor->tileChar.tRegion.tSize = ptUTF8Char->tCharSize;
    ptDescriptor->tileChar.tRegion.tLocation.iY = (int16_t)ptUTF8Char->hwIndex;

    ptDescriptor->iAdvance = ptUTF8Char->iAdvance;
    ptDescriptor->iBearingX= ptUTF8Char->iBearingX;
    ptDescriptor->iBearingY= ptUTF8Char->iBearingY;

    return ptDescriptor;
}

const
struct {
    implement(arm_2d_user_font_t);
    arm_2d_char_idx_t tUTF8Table;
} ARM_2D_FONT_SQUARE_DIGITS_24_A4 = {

    .use_as__arm_2d_user_font_t = {
        .use_as__arm_2d_font_t = {
            .tileFont = impl_child_tile(
                c_tileUTF8SQUARE_DIGITS_24A4Mask,
                0,          /* x offset */
                0,          /* y offset */
                11,        /* width */
                165         /* height */
            ),
            .tCharSize = {
                .iWidth = 11,
                .iHeight = 15,
            },
            .nCount =  11,                             //!< Character count
            .fnGetCharDescriptor = &__utf8_a4_font_get_char_descriptor,
            .fnDrawChar = &__arm_2d_lcd_text_default_a4_font_draw_char,
        },
        .hwCount = 1,
        .hwDefaultCharIndex = 1, /* tBlank */
    },

    .tUTF8Table = {
        .hwCount = 11,
        .hwOffset = 0,
    },
};

#undef __UTF8_FONT_SIZE_4__

ARM_SECTION("arm2d.asset.FONT")
const uint8_t c_bmpUTF8SQUARE_DIGITS_24A8Font[] = {


    // Glyph for character {0x30}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,

    // Glyph for character {0x31}
    0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

    // Glyph for character {0x32}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,

    // Glyph for character {0x33}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,

    // Glyph for character {0x34}
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,

    // Glyph for character {0x35}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,

    // Glyph for character {0x36}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,

    // Glyph for character {0x37}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,

    // Glyph for character {0x38}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,

    // Glyph for character {0x39}
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,

    // Glyph for character {0x3a}
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    // a white space
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
};

ARM_SECTION("arm2d.asset.FONT")
 __ttf_char_descriptor_t c_tUTF8SQUARE_DIGITS_24LookUpTableA8[] = {

    { 0, { 11, 15, }, 14, 0, 15, 1, {0x30} },
    { 15, { 5, 15, }, 8, 0, 15, 1, {0x31} },
    { 30, { 11, 15, }, 14, 0, 15, 1, {0x32} },
    { 45, { 11, 15, }, 14, 0, 15, 1, {0x33} },
    { 60, { 11, 15, }, 14, 0, 15, 1, {0x34} },
    { 75, { 11, 15, }, 14, 0, 15, 1, {0x35} },
    { 90, { 11, 15, }, 14, 0, 15, 1, {0x36} },
    { 105, { 11, 15, }, 14, 0, 15, 1, {0x37} },
    { 120, { 11, 15, }, 14, 0, 15, 1, {0x38} },
    { 135, { 11, 15, }, 14, 0, 15, 1, {0x39} },
    { 150, { 2, 12, }, 5, 0, 12, 1, {0x3a} },
    { 162, { 11, 15, }, 11, 0, 15, 1, {0x20} },
};



ARM_SECTION("arm2d.tile.c_tileUTF8SQUARE_DIGITS_24A8Mask")
static const arm_2d_tile_t c_tileUTF8SQUARE_DIGITS_24A8Mask = {
    .tRegion = {
        .tSize = {
            .iWidth = 11,
            .iHeight = 165,
        },
    },
    .tInfo = {
        .bIsRoot = true,
        .bHasEnforcedColour = true,
        .tColourInfo = {
            .chScheme = ARM_2D_COLOUR_8BIT,
        },
    },
    .pchBuffer = (uint8_t *)c_bmpUTF8SQUARE_DIGITS_24A8Font,
};

#define __UTF8_FONT_SIZE_8__



static
IMPL_FONT_GET_CHAR_DESCRIPTOR(__utf8_a8_font_get_char_descriptor)
{
    assert(NULL != ptFont);
    assert(NULL != ptDescriptor);
    assert(NULL != pchCharCode);

    arm_2d_user_font_t *ptThis = (arm_2d_user_font_t *)ptFont;
    ARM_2D_UNUSED(ptThis);

    memset(ptDescriptor, 0, sizeof(arm_2d_char_descriptor_t));

    ptDescriptor->tileChar.ptParent = (arm_2d_tile_t *)&ptFont->tileFont;
    ptDescriptor->tileChar.tInfo.bDerivedResource = true;

    /* use the white space as the default char */
    __ttf_char_descriptor_t *ptUTF8Char =
        (__ttf_char_descriptor_t *)&c_tUTF8SQUARE_DIGITS_24LookUpTableA8[dimof(c_tUTF8SQUARE_DIGITS_24LookUpTableA8)-1];

    arm_foreach(__ttf_char_descriptor_t, c_tUTF8SQUARE_DIGITS_24LookUpTableA8, ptChar) {
        if (0 == strncmp(   (char *)pchCharCode,
                            (char *)ptChar->chUTF8,
                            ptChar->chCodeLength)) {
            /* found the UTF8 char */
            ptUTF8Char = ptChar;
            break;
        }
    }

    ptDescriptor->chCodeLength = ptUTF8Char->chCodeLength;
    ptDescriptor->tileChar.tRegion.tSize = ptUTF8Char->tCharSize;
    ptDescriptor->tileChar.tRegion.tLocation.iY = (int16_t)ptUTF8Char->hwIndex;

    ptDescriptor->iAdvance = ptUTF8Char->iAdvance;
    ptDescriptor->iBearingX= ptUTF8Char->iBearingX;
    ptDescriptor->iBearingY= ptUTF8Char->iBearingY;

    return ptDescriptor;
}

const
struct {
    implement(arm_2d_user_font_t);
    arm_2d_char_idx_t tUTF8Table;
} ARM_2D_FONT_SQUARE_DIGITS_24_A8 = {

    .use_as__arm_2d_user_font_t = {
        .use_as__arm_2d_font_t = {
            .tileFont = impl_child_tile(
                c_tileUTF8SQUARE_DIGITS_24A8Mask,
                0,          /* x offset */
                0,          /* y offset */
                11,        /* width */
                165         /* height */
            ),
            .tCharSize = {
                .iWidth = 11,
                .iHeight = 15,
            },
            .nCount =  11,                             //!< Character count
            .fnGetCharDescriptor = &__utf8_a8_font_get_char_descriptor,
            .fnDrawChar = &__arm_2d_lcd_text_default_a8_font_draw_char,
        },
        .hwCount = 1,
        .hwDefaultCharIndex = 1, /* tBlank */
    },

    .tUTF8Table = {
        .hwCount = 11,
        .hwOffset = 0,
    },
};

#undef __UTF8_FONT_SIZE_8__



#if defined(__clang__)
#   pragma clang diagnostic pop
#elif defined(__IS_COMPILER_ARM_COMPILER_5__)
#   pragma diag_warning=1296
#endif

